package com.ics.service.impl;

import com.ics.dao.CommodityTeamDao;
import com.ics.model.CommodityTeam;
import com.ics.service.CommodityTeamManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 11-10-31
 * Time: 下午5:12
 * To change this template use File | Settings | File Templates.
 */
@Service("commodityTeamManager")
public class CommodityTeamManagerImpl extends GenericManagerImpl<CommodityTeam,Long> implements CommodityTeamManager{
    CommodityTeamDao commodityTeamDao;
    @Autowired
    public CommodityTeamManagerImpl(CommodityTeamDao commodityTeamDao){
        super(commodityTeamDao);
        this.commodityTeamDao=commodityTeamDao;
    }
    public List<CommodityTeam> getCommodityTeams() {
        return commodityTeamDao.getCommodityTeams();
    }

    public CommodityTeam  saveCommodityTeam(CommodityTeam commodityTeam) {
       return commodityTeamDao.save(commodityTeam);
    }

    public CommodityTeam getCommodityTeam(Long id) {
        return commodityTeamDao.get(id);
    }
}
